/*
 Navicat Premium Data Transfer

 Source Server         : 192.168.1.132_kzyy
 Source Server Type    : MySQL
 Source Server Version : 50725
 Source Host           : 192.168.1.132
 Source Database       : kzyy

 Target Server Type    : MySQL
 Target Server Version : 50725
 File Encoding         : utf-8

 Date: 06/08/2020 15:31:06 PM
*/

SET NAMES utf8;
SET FOREIGN_KEY_CHECKS = 0;

-- ----------------------------
--  Table structure for `area`
-- ----------------------------
DROP TABLE IF EXISTS `area`;
CREATE TABLE `area` (
  `id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'id',
  `name` varchar(255) COLLATE utf8_bin DEFAULT NULL COMMENT '区名称',
  `code` varchar(50) COLLATE utf8_bin DEFAULT NULL COMMENT '区编码',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=39 DEFAULT CHARSET=utf8 COLLATE=utf8_bin;

-- ----------------------------
--  Records of `area`
-- ----------------------------
BEGIN;
INSERT INTO `area` VALUES ('29', '向阳区', '280803'), ('30', '前进区', '280804'), ('31', '东风区', '280805'), ('32', '郊区', '280811'), ('33', '桦南县', '280822'), ('34', '桦川县', '280826'), ('35', '汤原县', '280828'), ('36', '抚远县', '280833'), ('37', '同江市', '280881'), ('38', '富锦市', '280882');
COMMIT;

-- ----------------------------
--  Table structure for `key_value_configurations`
-- ----------------------------
DROP TABLE IF EXISTS `key_value_configurations`;
CREATE TABLE `key_value_configurations` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `kzyykey` varchar(255) COLLATE utf8_bin DEFAULT NULL COMMENT '配置字段',
  `kzyyvalue` varchar(255) COLLATE utf8_bin DEFAULT NULL COMMENT '配置值',
  `kzyydesc` varchar(255) COLLATE utf8_bin DEFAULT NULL COMMENT '字段描述',
  PRIMARY KEY (`id`),
  UNIQUE KEY `index_kzyykey` (`kzyykey`)
) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='常量配置';

-- ----------------------------
--  Records of `key_value_configurations`
-- ----------------------------
BEGIN;
INSERT INTO `key_value_configurations` VALUES ('1', 'OVERDUE_DATE', '7', '订单在几天后未领取过期(不要修改)'), ('2', 'ORDER_INITIATION_INTERVAL', '7', '发起预约成功时间间隔'), ('3', 'APPOINTMENT_TIME', '06:00~18:00', '每天口罩预约时间'), ('4', 'LIMITATION_COUNT', '7', '每人每次限领口罩数'), ('5', 'DAY_FREQUENCY', '1', '隔多少天能预约的次数'), ('6', 'EXTRACT_TIME', '12:00~18:00', '成功预约后领取时间(废弃)'), ('7', 'QRCODE_ADDRESS', 'http://183.134.96.66:8113/site-audit', '二维码链接'), ('8', 'APPOINTMENT_WEEK', '1,3,5,2,4', '预约(周日~周一)(0-6)');
COMMIT;

-- ----------------------------
--  Table structure for `manager`
-- ----------------------------
DROP TABLE IF EXISTS `manager`;
CREATE TABLE `manager` (
  `id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'ID',
  `name` varchar(255) COLLATE utf8_bin DEFAULT NULL COMMENT '姓名',
  `phone` varchar(255) COLLATE utf8_bin DEFAULT NULL COMMENT '手机号',
  `password` varchar(255) COLLATE utf8_bin DEFAULT NULL COMMENT '密码',
  `store_code` varchar(255) COLLATE utf8_bin DEFAULT NULL COMMENT '药店编号',
  `state` tinyint(3) DEFAULT NULL COMMENT '状态 1-有效 2-无效',
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE KEY `uk_phone` (`phone`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=25 DEFAULT CHARSET=utf8 COLLATE=utf8_bin;

-- ----------------------------
--  Records of `manager`
-- ----------------------------
BEGIN;
INSERT INTO `manager` VALUES ('1', '凌江', '13300000000', '8d969eef6ecad3c29a3a629280e686cf0c3f5d5a86aff3ca12020c923adc6c92', '', '1'), ('2', '何山', '15356641601', '4d4f26369171994f3a46776ee2d88494fb9955800a5bb6261c016c4bb9f30b56', null, '1'), ('3', '王越洋', '15649866368', '8d969eef6ecad3c29a3a629280e686cf0c3f5d5a86aff3ca12020c923adc6c92', null, '1'), ('9', '王德发', '15001121481', '8d969eef6ecad3c29a3a629280e686cf0c3f5d5a86aff3ca12020c923adc6c92', '', '1'), ('21', '车车', '15600000000', '8d969eef6ecad3c29a3a629280e686cf0c3f5d5a86aff3ca12020c923adc6c92', null, '1'), ('23', '李斯', '13100000000', '5a012756f3fe06210fe8f3afca3176541d8ad232e9d34aa5aedf7c19715ad4b9', '', '1'), ('24', '傅彬', '18258906066', 'd16f083e6b04b91a189fd0661df8c9b899e2b738049b95d795e9a7c0f7998ac6', '', '1');
COMMIT;

-- ----------------------------
--  Table structure for `order_record`
-- ----------------------------
DROP TABLE IF EXISTS `order_record`;
CREATE TABLE `order_record` (
  `id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'id',
  `order_id` varchar(50) COLLATE utf8_bin DEFAULT NULL COMMENT '订单id',
  `order_time` datetime DEFAULT NULL COMMENT '订单时间',
  `order_card` varchar(20) COLLATE utf8_bin DEFAULT NULL COMMENT '订单人身份证号',
  `order_store_code` varchar(50) COLLATE utf8_bin DEFAULT NULL COMMENT '被预约的药店编码',
  `qrcode_path` varchar(255) COLLATE utf8_bin DEFAULT NULL COMMENT '二维码地址',
  `receive_time` datetime DEFAULT NULL COMMENT '领取时间',
  `receive_status` tinyint(4) DEFAULT NULL COMMENT '领取状态 1-未领取，2-已领取',
  `order_status` tinyint(5) DEFAULT NULL COMMENT '订单状态 1-失效，2-有效',
  `token` varchar(255) COLLATE utf8_bin DEFAULT NULL COMMENT 'tk',
  `user_id` int(11) DEFAULT NULL COMMENT '下订单的用户id',
  `receive_user_id` int(11) DEFAULT NULL COMMENT '扫此订单二维码确认订单状态为已领取的商家用户id',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=409 DEFAULT CHARSET=utf8 COLLATE=utf8_bin;

-- ----------------------------
--  Records of `order_record`
-- ----------------------------
BEGIN;
INSERT INTO `order_record` VALUES ('405', '20200308150648346_480839060000', '2020-03-08 15:06:48', '330721199512201437', '20200327164900214330', '/opt/file/kzyy/qrcode/330721199512201437/1586329608346_50079.png', null, '1', '1', '0001fe871d5992e349c9bcaae1709051a814b3f2fbf3', '30', null), ('406', '20200308150837240_582981900000', '2020-03-08 15:08:37', '612422198110096632', '20200327165039299937', '/opt/file/kzyy/qrcode/612422198110096632/1586329717240_50401.png', null, '1', '1', '0001d27150cc02fc490cbd2bac88d5da209eb0f39b3d', '36', null), ('407', '20200407152803777_827837670000', '2020-04-07 15:28:04', '612422198110096632', '20200327165039299937', '/opt/file/kzyy/qrcode/612422198110096632/1586330883777_02229.png', '2020-04-08 15:33:51', '2', '2', '0001ef2ac3f69c204eecb00b23789e58a9e00a2a75b4', '30', '36'), ('408', '20200408172740557_937387360000', '2020-04-08 17:27:41', '110101199003077459', '20200327165039299937', '/opt/file/kzyy/qrcode/110101199003077459/1586338060557_62674.png', null, '1', '1', '00017224297892aa4e46b0d2e18965bc788b4c2b9c02', '31', null);
COMMIT;

-- ----------------------------
--  Table structure for `personal_information`
-- ----------------------------
DROP TABLE IF EXISTS `personal_information`;
CREATE TABLE `personal_information` (
  `id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'id',
  `name` varchar(255) COLLATE utf8_bin DEFAULT NULL COMMENT '姓名',
  `card` varchar(20) COLLATE utf8_bin DEFAULT NULL COMMENT '身份证号',
  `phone` varchar(20) COLLATE utf8_bin DEFAULT NULL COMMENT '手机号码',
  `user_id` int(11) DEFAULT NULL COMMENT '用户id',
  `xb` int(5) DEFAULT NULL COMMENT '性别：1-男，2-女',
  `age` int(5) DEFAULT NULL COMMENT '年龄',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=644 DEFAULT CHARSET=utf8 COLLATE=utf8_bin;

-- ----------------------------
--  Records of `personal_information`
-- ----------------------------
BEGIN;
INSERT INTO `personal_information` VALUES ('640', '傅彬', '330721199512201437', '18258906066', '30', null, null), ('641', '刘乐乐', '612422198110096632', '18850149366', '36', null, null), ('642', '刘乐乐', '612422198110096632', '18850149366', '30', null, null), ('643', '小车車', '110101199003077459', '18556355920', '31', null, null);
COMMIT;

-- ----------------------------
--  Table structure for `store`
-- ----------------------------
DROP TABLE IF EXISTS `store`;
CREATE TABLE `store` (
  `id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'id',
  `name` varchar(255) COLLATE utf8_bin DEFAULT NULL COMMENT '药店名称',
  `store_code` varchar(50) COLLATE utf8_bin DEFAULT NULL COMMENT '药店编码',
  `area_code` varchar(50) COLLATE utf8_bin DEFAULT NULL COMMENT '药店位置区编号',
  `address` varchar(255) COLLATE utf8_bin DEFAULT NULL COMMENT '药店位置具体地址',
  `store_status` int(5) DEFAULT '1' COMMENT '药店状态：1-开启，2-关闭',
  `create_time` datetime DEFAULT NULL COMMENT '创建时间',
  `update_time` datetime DEFAULT NULL COMMENT '修改时间',
  `contacts` varchar(255) COLLATE utf8_bin DEFAULT NULL COMMENT '联系人',
  `contacts_phone` varchar(255) COLLATE utf8_bin DEFAULT NULL COMMENT '联系人手机号',
  `appoint_time` varchar(255) COLLATE utf8_bin DEFAULT NULL COMMENT '药店能领取口罩时间',
  `week` varchar(255) COLLATE utf8_bin DEFAULT NULL COMMENT '周一~周日',
  `week_time` varchar(255) COLLATE utf8_bin DEFAULT NULL COMMENT '拼接字段',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=57 DEFAULT CHARSET=utf8 COLLATE=utf8_bin;

-- ----------------------------
--  Records of `store`
-- ----------------------------
BEGIN;
INSERT INTO `store` VALUES ('40', '大仁堂医药(新特药店)', '20200327164900214330', '280804', '光复西路666', '1', '2020-03-27 16:49:00', null, '张三', '18822332233', '09:00,12:00,14:00,18:00', '周一，周二，周三，周四，周五，周六', '上午09:00~12:00 下午14:00~18:00'), ('41', '百姓医药(德祥分店)', '20200327165039299937', '280804', '德祥街260-6号', '1', '2020-03-27 16:50:39', '2020-04-08 15:54:16', '张三', '18811112222', '09:00,12:00,14:00,18:00', '周一，周二，周三，周四，周五', '上午09:00~12:00 下午14:00~18:00'), ('42', '祥达大药房', '20200327165503172714', '280804', '桥南路83', '1', '2020-03-27 16:55:03', '2020-03-31 10:36:10', '张三', '13344442222', '09:00,12:00,14:00,18:00', '周一，周二，周三，周四，周五', '上午09:00~12:00 下午14:00~18:00'), ('43', '泳安大药房(万达店)', '20200327165643224772', '280804', '万达广场室外步行街西头万达一期、二期、三期中心', '1', '2020-03-27 16:56:43', null, '张三', '13322221111', '09:00,12:00,14:00,18:00', '周一，周二，周三，周四，周五', '上午09:00~12:00 下午14:00~18:00'), ('44', '春天大药房(信和店)', '20200327165834164135', '280804', '温州城东侧新谊路中房5号楼', '1', '2020-03-27 16:58:34', null, '张三', '13344445555', '09:00,12:00,14:00,18:00', '周一，周二，周三，周四，周五', '上午09:00~12:00 下午14:00~18:00'), ('45', '金天爱心药房(通江店)', '20200327165950010119', '280804', '通江街31', '1', '2020-03-27 16:59:50', null, '张三', '13344445555', '09:00,12:00,14:00,18:00', '周一，周二，周三，周四，周五', '上午09:00~12:00 下午14:00~18:00'), ('46', '益鑫堂大药房', '20200327170120957294', '280804', '义兴巷长安嘉苑7号楼(吉运花园西)', '1', '2020-03-27 17:01:21', null, '张三1', '13322223333', '09:00,12:00,14:00,18:00', '周一，周二，周三，周四，周五', '上午09:00~12:00 下午14:00~18:00'), ('47', '华伟大药房(华府店)', '20200327170216975763', '280804', '万达路', '1', '2020-03-27 17:02:17', null, '张三', '13344442222', '09:00,12:00,14:00,18:00', '周一，周二，周三，周四，周五', '上午09:00~12:00 下午14:00~18:00'), ('48', '华富大药房(光复东路店)', '20200327171245955364', '280804', '光复东路200', '1', '2020-03-27 17:12:46', null, '张三1', '13355552222', '09:00,12:00,13:00,18:00', '周一，周二，周三，周四，周五，周六', '上午09:00~12:00 下午13:00~18:00'), ('49', '天天好大药房(站前路店)', '20200327171315318556', '280804', '站前路299号', '1', '2020-03-27 17:13:15', null, '张三12', '13344442222', '09:00,12:00,13:00,18:00', '周一，周二，周三，周四，周五', '上午09:00~12:00 下午13:00~18:00'), ('50', '德伟大药房', '20200327171357383242', '280804', '向阳巷24号', '1', '2020-03-27 17:13:57', null, '郑州', '13322221111', '09:00,12:00,13:00,18:00', '周一，周二，周三，周四，周五，周六', '上午09:00~12:00 下午13:00~18:00'), ('51', '春天大药房(友谊店)', '20200327171504744189', '280804', '长安西路478', '1', '2020-03-27 17:15:05', null, '这周', '13344445555', '09:00,12:00,13:00,18:00', '周一，周二，周三，周四，周五', '上午09:00~12:00 下午13:00~18:00'), ('52', '金天健康爱心药房(蓝天分店)', '20200327171558306905', '280804', '安庆街33正北方向100米', '1', '2020-03-27 17:15:58', null, '和同事', '13322224444', '09:00,12:00,13:00,18:00', '周一，周二，周三，周四，周五', '上午09:00~12:00 下午13:00~18:00'), ('53', '佳佳大药房', '20200327171637579547', '280804', '安庆街49号2', '1', '2020-03-27 17:16:38', '2020-04-08 16:18:58', '单点', '13322421234', '09:00,12:00,13:00,18:00', '周一，周二，周三，周四，周五', '上午09:00~12:00 下午13:00~18:00'), ('54', 'fbtest2', '20200404124215824738', '280804', '学源街256号', '2', '2020-04-04 12:42:16', '2020-04-08 16:19:46', 'fb', '18258906066', '09:00,12:00,13:00,18:00', '周一，周二，周三，周四，周五', '上午09:00~12:00 下午13:00~18:00'), ('55', 'fbfb2', '20200404124545963517', '280803', '学林街', '1', '2020-04-04 12:45:46', '2020-04-08 18:06:00', 'fb', '18258906066', '09:00,12:00,13:00,18:00', '周一，周二，周三，周四，周五', '上午09:00~12:00 下午13:00~18:00'), ('56', '111', '20200408180910375695', '280803', 'aaaaa', '1', '2020-04-08 18:09:10', null, 'aaa', '18258906066', '09:00,12:00,13:00,18:00', '周一，周二，周三，周四，周五', '上午09:00~12:00 下午13:00~18:00');
COMMIT;

-- ----------------------------
--  Table structure for `store_inventory`
-- ----------------------------
DROP TABLE IF EXISTS `store_inventory`;
CREATE TABLE `store_inventory` (
  `id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'id',
  `store_code` varchar(50) COLLATE utf8_bin NOT NULL COMMENT '药店编码',
  `kz_count` int(11) NOT NULL COMMENT '单天药店可预约的剩余口罩总数',
  `update_time` datetime DEFAULT NULL COMMENT '更新时间',
  `once_count` int(11) DEFAULT NULL COMMENT '单次可预约口罩个数',
  `version` int(11) DEFAULT '1' COMMENT '修改剩余口罩数版本，无用',
  `all_count` int(11) DEFAULT NULL COMMENT '存货-不变，可修改',
  `create_time` datetime DEFAULT NULL COMMENT '创建时间',
  `replenish_next_day` int(11) DEFAULT '0' COMMENT '次日补货量',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=4056 DEFAULT CHARSET=utf8 COLLATE=utf8_bin;

-- ----------------------------
--  Records of `store_inventory`
-- ----------------------------
BEGIN;
INSERT INTO `store_inventory` VALUES ('38', '20200327164900214330', '686', '2020-06-08 00:01:00', '7', '1', '686', '2020-03-27 16:49:00', '0'), ('39', '20200327165039299937', '179', '2020-06-08 00:01:00', '7', '1', '179', '2020-03-27 16:50:39', '0'), ('40', '20200327165503172714', '97', '2020-06-08 00:01:00', '7', '1', '97', '2020-03-27 16:55:03', '0'), ('41', '20200327165643224772', '100', '2020-06-08 00:01:00', '7', '1', '100', '2020-03-27 16:56:43', '0'), ('42', '20200327165834164135', '100', '2020-06-08 00:01:00', '7', '1', '100', '2020-03-27 16:58:34', '0'), ('43', '20200327165950010119', '100', '2020-06-08 00:01:00', '7', '1', '100', '2020-03-27 16:59:50', '0'), ('44', '20200327170120957294', '100', '2020-06-08 00:01:00', '7', '1', '100', '2020-03-27 17:01:21', '0'), ('45', '20200327170216975763', '100', '2020-06-08 00:01:00', '7', '1', '100', '2020-03-27 17:02:17', '0'), ('46', '20200327171245955364', '100', '2020-06-08 00:01:00', '7', '1', '100', '2020-03-27 17:12:46', '0'), ('47', '20200327171315318556', '100', '2020-06-08 00:01:00', '7', '1', '100', '2020-03-27 17:13:15', '0'), ('48', '20200327171357383242', '100', '2020-06-08 00:01:00', '7', '1', '100', '2020-03-27 17:13:57', '0'), ('49', '20200327171504744189', '100', '2020-06-08 00:01:00', '7', '1', '100', '2020-03-27 17:15:05', '0'), ('50', '20200327171558306905', '100', '2020-06-08 00:01:00', '7', '1', '100', '2020-03-27 17:15:58', '0'), ('51', '20200327171637579547', '110', '2020-06-08 00:01:00', '7', '1', '110', '2020-03-27 17:16:38', '0'), ('2053', '20200404124215824738', '101', '2020-06-08 00:01:00', '7', '1', '101', '2020-04-04 12:42:16', '0'), ('2054', '20200404124545963517', '1', '2020-06-08 00:01:00', '7', '1', '1', '2020-04-04 12:45:46', '0'), ('4055', '20200408180910375695', '0', '2020-06-08 00:01:00', '7', '1', '0', '2020-04-08 18:09:10', '0');
COMMIT;

-- ----------------------------
--  Table structure for `user`
-- ----------------------------
DROP TABLE IF EXISTS `user`;
CREATE TABLE `user` (
  `id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'id',
  `wxid` varchar(255) COLLATE utf8_bin NOT NULL COMMENT '微信id',
  `role` int(5) DEFAULT NULL COMMENT '暂无用',
  `manager_name` varchar(255) COLLATE utf8_bin DEFAULT NULL COMMENT '药店管理者姓名',
  `manager_phone` varchar(20) COLLATE utf8_bin DEFAULT NULL COMMENT '药店管理者电话',
  `store_code` varchar(255) COLLATE utf8_bin DEFAULT NULL COMMENT '药店编码',
  `qr_check` int(5) DEFAULT NULL COMMENT '是否有扫码权限：1-有，2-无',
  `cancel_reason` int(11) DEFAULT '0' COMMENT '取消原因(正常权限-0,其它原因-1,店铺禁用原因-2)',
  `create_time` datetime DEFAULT NULL COMMENT '创建时间',
  `update_time` datetime DEFAULT NULL COMMENT '修改时间',
  PRIMARY KEY (`id`),
  UNIQUE KEY `uk_wxid` (`wxid`)
) ENGINE=InnoDB AUTO_INCREMENT=37 DEFAULT CHARSET=utf8 COLLATE=utf8_bin;

-- ----------------------------
--  Records of `user`
-- ----------------------------
BEGIN;
INSERT INTO `user` VALUES ('1', 'o0s3atzH8bI2_dmSTq6A8VbIrB40', null, '凌江', '15757181159', '20200327171637579547', '1', '0', '2020-03-27 15:19:06', '2020-04-08 13:59:39'), ('30', 'o0s3atzDcN83muxcfrKJnQ8bcGhQ', null, '傅彬', '18258906066', '20200327164900214330', '1', '0', '2020-03-27 14:42:16', '2020-04-07 10:46:46'), ('31', 'o0s3at4NDhzUsjxHGeZfkOpiXf0g', null, '小车車', '18556355920', '20200327165503172714', '1', '0', '2020-03-27 14:53:17', '2020-03-31 10:36:10'), ('33', 'o0s3at7U47qOANtDKJI_5avFOPPE', null, null, null, null, '2', '0', '2020-03-27 16:08:49', null), ('34', 'o0s3at3RgO8xgKzb9J4cg4VzkGFQ', null, 'zzq', '18868106073', '20200327171558306905', '1', '0', '2020-03-27 16:46:32', '2020-04-08 15:54:06'), ('35', 'o0s3atyHsbD8BgeT7OE3WgOu9mC8', null, '王越洋', '15649866368', '20200327165039299937', '2', '1', '2020-03-27 16:53:28', '2020-04-08 15:46:28'), ('36', 'o0s3at7g4fAOoQH616fI9RskFr4k', null, '刘乐乐', '18850149366', '20200327165039299937', '1', '0', '2020-04-08 15:07:56', '2020-04-08 15:54:16');
COMMIT;

SET FOREIGN_KEY_CHECKS = 1;
